package com.xjc.system.listener;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class StartupInfoListener implements ApplicationListener<ApplicationReadyEvent> {

    @Value("${server.port}")
    String port;

    @Override
    public void onApplicationEvent(ApplicationReadyEvent event) {
        System.out.println("                                                  项目-端口："+port);
    }
}
   